package src.main.shipeiqi.duixianf_shipeiqi;

import src.main.shipeiqi.lei_shipeiqi.New;
import src.main.shipeiqi.lei_shipeiqi.Old;

/**根据对象选择适配器*/
public class OldAndNewObject implements New {
    private Old old;
    public OldAndNewObject(Old old){
        this.old=old;
    }
    public void old(){
        old.old();
    }

    @Override
    public void newF() {
        System.out.println("新的方式");
    }
}
